
	* APPENDIX I - DOES THE ACT OF VOTING INFLUENCE POLICY VIEWS?		
	
cd "$data"
use "besip.dta", clear 

	
	recode immigEconW1 (1=7) (2=6) (3=5) (5=3) (6=2) (7=1)
	recode immigEconW4 (1=7) (2=6) (3=5) (5=3) (6=2) (7=1)
	recode immigCulturalW1 (1=7) (2=6) (3=5) (5=3) (6=2) (7=1)
	recode immigCulturalW4 (1=7) (2=6) (3=5) (5=3) (6=2) (7=1)
	recode eesEUIntegrationSelfW1 (10=0) (9=1) (8=2) (7=3) (6=4) (4=6) (3=7) (2=8) (1=9) (0=10)



*first time eligible in 2010 elections 
gen eligible_2010b = . // very sharp cutoff 
replace eligible_2010b = 1 if Age ==22
replace eligible_2010b = 0 if Age ==21

*first time eligible in 2010 elections 
gen eligible_2010a = . // not so sharp cutoff (2 years)
replace eligible_2010a = 1 if Age ==22 | Age == 23
replace eligible_2010a = 0 if Age == 21 | Age ==20 


eststo eligibilitya1: regress leftRightW1 i.eligible_2010a if leftRightW1<11
eststo eligibilitya2: regress redistSelfW1 i.eligible_2010a if redistSelfW1<11
eststo eligibilitya3: regress eesEUIntegrationSelfW1 i.eligible_2010a if eesEUIntegrationSelfW1<11
eststo eligibilitya4: regress immigEconW1 i.eligible_2010a if immigEconW1<11
eststo eligibilitya5: regress immigCulturalW1 i.eligible_2010a if immigCulturalW1<11
eststo eligibilitya3_: regress EUIntegrationSelfW1 i.eligible_2010a if EUIntegrationSelfW1<11


eststo eligibilityb1: regress leftRightW1 i.eligible_2010b if leftRightW1<11
eststo eligibilityb2: regress redistSelfW1 i.eligible_2010b if redistSelfW1<11
eststo eligibilityb3: regress eesEUIntegrationSelfW1 i.eligible_2010b if eesEUIntegrationSelfW1<11
eststo eligibilityb4: regress immigEconW1 i.eligible_2010b if immigEconW1<11
eststo eligibilityb5: regress immigCulturalW1 i.eligible_2010b if immigCulturalW1<11
eststo eligibilityb3_: regress EUIntegrationSelfW1 i.eligible_2010b if EUIntegrationSelfW1<11

cd "$tables"
 esttab eligibilitya1 eligibilitya2 eligibilitya4 eligibilitya5 eligibilitya3 using eligibilitya.tex, replace ///
 b(3) se(2) ///
 collabels("left-right" "redistribution" "immigration 1" "immigration 2" "EU integration") ///
 coeflabels(intercept "") ///
 title("Does eligibility lead to changes in policy views?") 
 
  esttab eligibilityb1 eligibilityb2 eligibilityb4 eligibilityb5 eligibilityb3 using eligibilityb.tex, replace ///
 b(3) se(2) ///
 collabels("left-right" "redistribution" "immigration 1" "immigration 2" "EU integration") ///
 coeflabels(intercept "") ///
 title("Does eligibility lead to changes in policy views?") 


	